package java4_12;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Java5 {

	public static void main(String[] args) {
		Calendar c = Calendar.getInstance();
		SimpleDateFormat s = new SimpleDateFormat();
		s.applyPattern("yyyy-MM-dd");
		Date d = new Date();
		for (int i = 1; i <= c.getActualMaximum(c.DAY_OF_YEAR); i++) {
			c.set(c.DAY_OF_YEAR, i);
			if (c.get(c.DAY_OF_WEEK) == Calendar.SUNDAY) {
				d = c.getTime();
				String a = s.format(d);
				System.out.println(a);
			}
		}

	}
}
